//

#ifndef LINKEDLIST_H
#define LINKEDLIST_H
#include <cstdlib>

class Node
{
  public:
    Node(): next(NULL) 
    {

    }
    
    Node(int value): next(NULL)
    {
      this->value = value;
    }

    int getValue() 
    { 
      return this->value;
    }

    void setValue(int value) 
    { 
      this->value = value;
    }

    Node *getNext()
    {
      return this->next;
    }

    void setNext(Node *node)
    {
      this->next = node;
    }
  
  private:
    int value;
    Node *next;
};

class LinkedList
{
  public:
    LinkedList();
    LinkedList(Node *);
    void addFirst(Node *);
    Node *getFirst();
    void removeFirst();
    void addLast(Node *);
    Node *getLast();
    void removeLast();

  private:
    Node *head, *tail;
};


#endif
